home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / prgmming / mmd / mmd.txt < prev    next >
Text File  |  1994-09-18  |  72KB  |  2,142 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.        MMD - Mark's MegaDebugger.
  13.        ==========================
  14.  
  15.  
  16.        Version 1.00.  September 1994.
  17.  
  18.  
  19.        Copyright (c) 1993 Mark Thomas
  20.  
  21.  
  22.        NPS Software.
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.     1 Contents
  41.     ─────────────────────────────────────────────────────────────────────
  42.  
  43.     1    Contents
  44.     2    Introduction
  45.     2.1    Features and Limitations
  46.     3    Legal Notice
  47.     4    Quick Start
  48.     5    Using MegaDebugger
  49.     5.1    Using the Window Mode
  50.     5.2    Using the Non-Window Modes
  51.     5.3    Screen Swapping
  52.     5.4    Expressions
  53.     6    Debugging a Program
  54.     6.1    Controlling Program Execution
  55.     6.2    Restarting the Program
  56.     7    Command Line Arguments
  57.     8    Command Reference
  58.     8.1    Command Parameters
  59.     9    Configuration
  60.     9.1    MMDCFG
  61.     10    Default Key Definitions
  62.     10.1    Default Microsoft Keys
  63.     10.2    Default Borland Keys
  64.     11    Operator Precedence Reference
  65.     11.1    Assembler Language Operators
  66.     11.2    C Language Operators
  67.     11.3    Pascal Language Operators
  68.     11.4    A86 Language Operators
  69.     12    Error Messages
  70.     12.1    Initialisation Errors
  71.     12.2    Command Errors
  72.     13    Known Bugs
  73.     14    Registering
  74.     15    Future Enhancements
  75.  
  76.  
  77.     2 Introduction
  78.     ─────────────────────────────────────────────────────────────────────
  79.  
  80.     MegaDebugger is a low level debugger for DOS programs that is
  81.     designed to provide powerful debugging functions in a more
  82.     modest amount of memory than traditional debuggers.
  83.  
  84.     This manual assumes that you have a basic knowledge of the 80x86
  85.     processor's instruction set and registers and of the debugging
  86.     process.  All key references in the manual are based on MMD's
  87.     default Microsoft configuration, a configuration file MMD_TD.CFG
  88.     is supplied for a Turbo Debugger setup.
  89.  
  90.  
  91.     2.1 Features and Limitations
  92.  
  93.       ■ Features:
  94.  
  95.     - A windowed output that automatically displays the registers,
  96.       watches and unassembly information.
  97.  
  98.     - Saves and restores MDA, CGA, EGA and VGA text and graphics
  99.       screens.  Register level swapping means that MMD can handle
  100.       split screens and VGA mode X perfectly.
  101.  
  102.     - Shows DOS memory allocation blocks, interrupt usage and open
  103.       files.
  104.  
  105.     - VGA 25, 28, 43, and 50 line text screen support.
  106.  
  107.     - Supports expressions using the operators and data types from C,
  108.       Pascal and Assembler/A86.
  109.  
  110.     - Extremely customisable.
  111.  
  112.     - Uses little memory (20k-80k) and works well on older 8086 and
  113.       286 systems with limited memory. Fast: No disk overlays and
  114.       quick conditional breakpoint and watchpoint evaluation.
  115.  
  116.     - MMD can 'keep' the keyboard interrupt, allowing it to function
  117.       with programs that install their own Int09 handler.
  118.  
  119.       ■ Limitations:
  120.  
  121.     - No support for numeric co-processor data types.
  122.  
  123.     - No symbolic or source level debugging.
  124.  
  125.     - No 386 support.
  126.  
  127.  
  128.     3 Legal Notice
  129.     ─────────────────────────────────────────────────────────────────────
  130.  
  131.     The MegaDebugger documentation and software are not public
  132.     domain.  They are copyrighted, Copyright (C) 1994 Mark Thomas.
  133.  
  134.     MegaDebugger is free for personal or private use.  However some
  135.     contribution to the development of MMD would be appreciated.
  136.     This can be a registration, donation, supply of information (see
  137.     the final section) or simply postcard or Email saying that you
  138.     find MMD useful.
  139.  
  140.     MegaDebugger is NOT free for use in a commercial, institutional
  141.     or governmental setting.  Permission is given to use the
  142.     software free of charge for a thirty day evaluation period,
  143.     after which registration is required for continued use.  A
  144.     single user registration costs AUS$50.00 and entitles you to a
  145.     free upgrade to the next version of MMD.  For site licence
  146.     information contact me.  Please send cheques or postal orders
  147.     (in Australian dollars please) to:
  148.  
  149.     Mark Thomas
  150.     8 Herronbee Street
  151.     Toowoomba, Queensland
  152.     Australia  4350.
  153.  
  154.     Please indicate a registration name and preferred disk size
  155.     when registering.
  156.  
  157.  
  158.     You are free to distribute COMPLETE and UNMODIFIED copies of all
  159.     the software and documentation via any means to any recipient
  160.     provided that no charge is made except a small and nominal fee
  161.     whose sole purpose is to recover reasonable distribution
  162.     expenses.
  163.  
  164.     This software is supplied "AS IS", WITHOUT ANY WARRANTY; without
  165.     even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  166.     PARTICULAR PURPOSE.  It is supplied as is, in the hope that
  167.     people will find it useful.  The author is not responsible for
  168.     any damage caused by use or misuse of this software.
  169.  
  170.  
  171.     4 Quick Start
  172.     ─────────────────────────────────────────────────────────────────────
  173.  
  174.     If you are familiar with other debuggers such as DEBUG, SYMDEB,
  175.     or CodeView then you will find the default MMD configuration
  176.     provides a similar environment.  However MMD is designed to be
  177.     configurable and MMD can easily be setup like Turbo Debugger
  178.     using the sample configuration file supplied.
  179.  
  180.     Here is a quick introduction to using MMD:
  181.  
  182.     ■ An important feature of MegaDebugger is its dual cursor
  183.     system.  Only the Assembler and Command windows can be made
  184.     active and both have separate cursors.    When the Assembler
  185.     window is the current window then its cursor will be
  186.     highlighted.  By holding the Shift key while using the scroll
  187.     keys the other window cursor can be controlled.  All letters
  188.     typed will go to the command window, and commands such as
  189.     F9;Toggle Breakpoint will work regardless of which window is
  190.     current.
  191.  
  192.       ■ To change the size of the windows use Ctrl-G; Expand command
  193.     window and Ctrl-T; Shrink command window.
  194.  
  195.       ■ There are some useful shortcut keys for the Assembler Window:
  196.     Ctrl+O;Origin, Ctrl+N;New CS:IP, Ctrl+P;NOP Instruction
  197.  
  198.       ■ The commands used by MMD are a superset of those in DEBUG and
  199.     are more flexible in that expressions can be used in the
  200.     parameters.  The H command or F1;Help will provide help on their
  201.     usage.    F3;Replay Command can be used recall and edit previous
  202.     commands.
  203.  
  204.       ■ "/VR /VG /VP"  provides the best screen swapping.
  205.  
  206.     Enables register level swapping, complete graphics saves and
  207.     palette saves.    The default swapping mode MMD uses is the
  208.     standard method used by most other programs which can corrupt
  209.     graphic screens, while register level swapping can restore
  210.     almost all screens.
  211.  
  212.     │
  213.     │  Do NOT use register level swapping if the target program may use SVGA
  214.     │    screen modes.  All Super VGA modes are controlled by extended set of
  215.     │    chipset specific registers, which MMD's register level swapping is
  216.     │    not aware of.  Therefore when swapping between the target screen and
  217.     │    MMD only the standard VGA registers will be saved and restored,
  218.     │    leaving the extended registers in an undetermined state.
  219.     │
  220.     │  *** USING REGISTER LEVEL SWAPPING WITH SUPER VGA MODES MAY DAMAGE ***
  221.     │  *** YOUR MONITOR OR GRAPHICS CARD.                 ***
  222.     │
  223.     │  All other MMD swapping modes (Standard and VGA BIOS) are completely
  224.     │    safe to use in all screen modes.
  225.     │
  226.  
  227.       ■ "/H- /VN /VR"  minimises the memory used by MMD.
  228.  
  229.     Disables help and higher screen mode changes and enables
  230.     register level swapping.  The standard swapping mode uses about
  231.     16k of memory for swapping, while register mode uses only 4k.
  232.     Help uses around 15k of memory and is rather limited so should
  233.     be disabled if it is not required.  If there is still
  234.     insufficient conventional memory for the target to run then try
  235.     Screen (/S) or DOS (/D) output modes (Note: is difficult to use
  236.     LOADHI to load MMD into the HMA as about 128k of memory is used
  237.     during initialisation).
  238.  
  239.       ■ I also recommend using the A86 language support: it provides a
  240.     unambiguous method for specifying decimal and hexadecimal numbers
  241.     and has the same operators as TASM and MASM.
  242.  
  243.       ■ MMDCFG can be used to create a custom configuration for MMD.
  244.  
  245.  
  246.     5 Using MegaDebugger
  247.     ─────────────────────────────────────────────────────────────────────
  248.  
  249.     When MegaDebugger has successfully loaded it will display its
  250.     initial screen with a start up message and a hyphen (-) prompt.
  251.  
  252.     MegaDebugger.  Version 1.00
  253.     (c) 1994 Mark Thomas
  254.     CPU:80286
  255.     -
  256.  
  257.     This means that the target program is ready for execution and
  258.     that MegaDebugger is ready to accept your commands.  Each
  259.     command consists command name of one or two characters followed
  260.     by any parameters that are required.  All input on the command
  261.     line is case insensitive, so input can be in upper or lower
  262.     case.
  263.  
  264.     5.1 Using the Window Mode
  265.  
  266.     The default output mode for MegaDebugger is window mode.  This
  267.     presents the debugging information on the screen in a series of
  268.     windows.  This is the most powerful mode of operation because
  269.     all the information from the Register, Unassembly and Watch
  270.     commands is automatically displayed and updated on the screen at
  271.     the same time.
  272.  
  273.       Register Windows
  274.  
  275.     There are two register windows in MegaDebugger, one across the
  276.     very top of the screen known as the Horizontal Register window,
  277.     which will be closed initially.  The second, the Vertical
  278.     Register window, runs along the right hand side of the screen
  279.     and is open by default (the initial settings can be changed with
  280.     MMDCFG).  The reason for providing two windows is that the
  281.     output in the command window, particularly that of Dump Memory
  282.     command, can sometimes be obscured by the Vertical Register
  283.     window.
  284.  
  285.     The Vertical Register can be open and closed with F2;Toggle
  286.     Vertical Register Window, Ctrl-F2;Toggle Horizontal Register
  287.     Window performs the same function for the Horizontal Register
  288.     window.
  289.  
  290.       Watch Window
  291.  
  292.     The Watch window displays any watches that are active.    If there
  293.     are no watches then it will be closed, and remain so until a
  294.     watch is added using one of the Watch commands.  Each time a
  295.     watch is added or deleted this window will resize itself to
  296.     display all the current watches.
  297.  
  298.       Assembler Window
  299.  
  300.     In the centre of the screen is the Assembler window, which
  301.     displays an area of memory in disassembled processor
  302.     instructions.  A large blue highlight bar indicates the current
  303.     address of CS:IP.  As each instruction is executed, and the
  304.     values of CS:IP change the bar moves through the displayed code
  305.     to represent the flow of execution.  Also in the window is a
  306.     solid non-blinking cursor, which is the Assembler window cursor.
  307.  
  308.     An important feature of MegaDebugger is the dual cursor system.
  309.     At any time there are two independent cursors on the screen, the
  310.     first is the traditional hardware blinking cursor in the Command
  311.     window.  The second is a simulated cursor in the Assembler
  312.     window.  One of the windows is known as the current window, the
  313.     window that responds to the scrolling keys (Up, Down, PgUp, and
  314.     PgDn) and the other will be the secondary window.  MegaDebugger
  315.     provides a way to access the secondary window without having to
  316.     use F6;Change Window.
  317.  
  318.     By default the Assembler window is the current window.    Using
  319.     any of the window scroll keys will scroll the Assembler window.
  320.         By pressing and holding the Shift key while using the scroll
  321.         keys the Command window cursor can be controlled.  This method
  322.     is faster than continually pressing F6;Change Window to move
  323.     between windows.  It also means that a breakpoint can be set at
  324.     the address of the Assembler window cursor using the F9;Toggle
  325.     Breakpoint key at any time regardless of which is the current
  326.     window.
  327.  
  328.     The converse is also true, if the Command window is the
  329.     current window then the scroll keys will move the Command
  330.     window cursor and the Shift and scroll key combinations will
  331.     address the Assembler window.
  332.  
  333.     When the Assembler window is made the current window then its
  334.     cursor will become highlighted.  You can determine which is the
  335.     current window simply by looking at the colour of the Assembler
  336.     window cursor.
  337.  
  338.     Scrolling the Assembler window backwards will cause the screen
  339.     to flip backwards.  This is because it is very difficult for MMD
  340.     to determine the length of a previous instruction, as each byte
  341.     may have a valid interpretation.  Because it is possible for the
  342.     disassembly to become out of step with the actual code this way
  343.     the offset address can be adjusted one byte at a time using the
  344.     Ctrl-Right and Ctrl-Left keys.
  345.  
  346.       Command Window
  347.  
  348.     At the very bottom of the screen is the Command window, where
  349.     the MegaDebugger user prompt (-) is displayed and your commands
  350.     are entered.  The current input position is indicated by the
  351.     blinking cursor.  This is where the characters you type will be
  352.     displayed.  All keyboard input goes to this window regardless of
  353.     which is the current window.  Previous commands can be recalled
  354.     and edited using F3; Replay Command.
  355.  
  356.     The initial height of the window is only five lines. Any lines
  357.     that are printed by MMD will force the top lines to scroll
  358.     upward and disappear behind the Assembler window.  When the
  359.     window scrolls up the blinking cursor will disappear from the
  360.     screen, but it will still record any characters you enter.
  361.  
  362.     The height of the Command window (and consequently the Assembler
  363.     window) can be changed using the Ctrl-G and Ctrl-T keys.
  364.  
  365.     5.2 Using the Non Window Modes
  366.  
  367.     When either Screen or DOS output mode is specified on the
  368.     MegaDebugger command line the window functions are disabled and
  369.     the output can be thought of as if the Command window has been
  370.     expanded to fill the entire screen.  Instead of updating the
  371.     register window after a section of the target program has been
  372.     executed, MMD will dump the contents of the registers to the
  373.     screen.
  374.  
  375.     The function keys will continue to work in Screen output mode,
  376.     except those that are specifically for window mode.  In DOS
  377.     output mode none of the function keys are available so the
  378.     equivalent MegaDebugger commands must be used.
  379.  
  380.     Non window modes are usually only used to save memory or for a
  381.     primitive form of remote debugging (by redirecting the DOS
  382.     output to a COM port and displayed by a terminal program on the
  383.     local computer).
  384.  
  385.     5.3 Screen Swapping
  386.  
  387.     Because MMD output occupies the entire screen in Window and
  388.     Screen modes it leaves no space for the target program to
  389.     display its output.  To overcome this, a technique called screen
  390.     swapping is used to save and restore the output screen each time
  391.     a section of the target screen executes.  This means that all
  392.     the target program's output will be displayed normally on the
  393.     screen, and when MMD becomes active it will save a copy of this
  394.     screen and replace it with its own.  Then when returning to the
  395.     target program the output screen is restored.  MMD has three
  396.     swapping modes Smart, On and Off.  In most cases only smart
  397.     swapping mode will be the only mode required.  It swaps the
  398.     screen only when it considers necessary:
  399.  
  400.     - An instruction reads or writes to BIOS video data or screen
  401.       memory.
  402.  
  403.     - An IN or OUT (and INS or OUTS) instruction is executed.
  404.  
  405.     - During Go, Proceed or Goto Cursor.
  406.  
  407.     The "On" swapping mode swaps all the time, "Off" will disable
  408.     all swapping (losing any target output and corrupting the MMD
  409.     screen).  The View Output command or F4;View Output Screen can
  410.     be used to view the output screen from MMD at any time.
  411.  
  412.     5.4 Expressions
  413.  
  414.     MegaDebugger can evaluate expressions using operators from one
  415.     of four languages supported: C, Pascal, Assembler and A86. By
  416.     default Assembler operators are used, but this can be modified
  417.     as a command option or with MMDCFG.  An expression can be used
  418.     in any command parameter instead of providing a constant
  419.     address.
  420.  
  421.     An expression consists of an ordered mixture of constants and
  422.     operators from the current language.
  423.  
  424.       ■ Constants
  425.  
  426.     There are three types of constant values accepted by
  427.     MegaDebugger:
  428.  
  429.     - Numeric Constants: Numbers are interpreted according to the
  430.       current radix and language.  MMD has a several extensions to
  431.       the standard radix types for some languages, this is detailed
  432.       in Section 11.
  433.  
  434.     - Registers: The name of any of processor registers, both 8 and
  435.       16 bit, can be specified in an expression.  MMD will determine
  436.       the current value of the register and use it in the
  437.       expression.
  438.  
  439.     - Quoted Character Constants: A single character enclosed in
  440.       single quotation marks (') will be used in the expression as
  441.       the ASCII character equivalent.  To specify a single quote as
  442.       the character constant use three consecutive quote characters
  443.       (''').
  444.  
  445.       ■ Operators
  446.  
  447.     MMD supports all simple unary and binary operators and
  448.     parentheses for each language, see Section 11.    It does not
  449.     support any assignment operators, array and structure operators,
  450.     or pointer and type casting operators.    In evaluating an
  451.     expression all arithmetic is done in 16-bit unsigned integer
  452.     math, if the result exceeds that which can be stored in 16 bits
  453.     then it will simply wrap around to zero, with no warning.
  454.  
  455.  
  456.     6 Debugging a Program
  457.     ─────────────────────────────────────────────────────────────────────
  458.  
  459.     6.1 Controlling Program Execution
  460.  
  461.     MegaDebugger provides a number of ways for you to control the
  462.     execution of the target program.
  463.  
  464.       Trace.
  465.  
  466.     In single step mode, control returns to MMD after each processor
  467.     instruction is executed.  The Trace command or F8;Trace function
  468.     key can be used to trace through the target program.
  469.  
  470.       Breakpoint.
  471.  
  472.     A breakpoint defines an address in memory which, when executed,
  473.     will return control to MMD.  MegaDebugger provides 10 user
  474.     breakpoints for this purpose.  Breakpoints can be set with the
  475.     Set Breakpoint command, F9;Toggle Breakpoint function key or
  476.     with the Go command.
  477.  
  478.       Proceed.
  479.  
  480.     Proceed is similar to the trace function however it will step
  481.     over LOOP, CALL and repeated string instructions.  The Proceed
  482.     command or F10;Proceed function key can be used to proceed
  483.     through the target program.
  484.  
  485.       Go.
  486.  
  487.     When the Go function is used the target program is allowed to
  488.     execute freely until it terminates, or is interrupted by a
  489.     breakpoint or keyboard break.  The Go command or the F5;Go
  490.     function key can be used to run the target program.
  491.  
  492.       Keyboard Break Interrupt.
  493.  
  494.     When the target program is running MMD will monitor the keyboard
  495.     for the Ctrl-Break keyboard combination.  When these keys are
  496.     pressed it will force an immediate entry into the debugger
  497.     screen.  This method is different to the normal DOS Ctrl-Break
  498.     routine, however if you wish to force a DOS break then use the
  499.     Ctrl-C key combination.  MMD will not normally interrupt DOS
  500.     while it is handling a software INT 21 instruction, instead MMD
  501.     will wait until DOS completes processing and the break will
  502.     occur immediately after the INT 21 instruction.
  503.  
  504.       WatchPoint (Global Breakpoint)
  505.  
  506.     Setting a watchpoint and executing the target will cause MMD to
  507.     single step through each instruction and evaluate the expression
  508.     for each watchpoint at each step.  If the result is TRUE then
  509.     MMD will interrupt execution.  This slows the execution speed
  510.     greatly.
  511.  
  512.       Go To Cursor.
  513.  
  514.     When using Window mode there is an additional way to run the
  515.     target program, F7; Go To Cursor.  This will place a temporary
  516.     breakpoint at the address represented by the current cursor
  517.     position in the Assembler window and then run the target program
  518.     using the Go command.
  519.  
  520.  
  521.     6.2 Examining and Modifying the Program State
  522.  
  523.     Each time MMD returns from executing a section of the target
  524.     program it will update the display of the program state and
  525.     display the prompt to allow debugger commands to be entered.
  526.     The program can be altered at this stage by changing the values
  527.     of flags and registers (including CS:IP), or by modifying the
  528.     program memory with the Enter or Fill memory commands.
  529.  
  530.     6.3 Restarting the Program
  531.  
  532.     When the target program runs to completion MegaDebugger will
  533.     display the program termination messages:
  534.  
  535.     Program Terminated Normally (xx)
  536.  
  537.         or
  538.  
  539.     Program Terminated Resident (xx)
  540.  
  541.     The value in brackets is the return code, or error level that
  542.     the target program returned.  No further instructions can be
  543.     executed by MMD until the target program is reloaded using the
  544.     Reload Target File command.  If you try to use one of the
  545.     execution commands (Go, Trace or Proceed) or their equivalent
  546.     function keys MMD will display a message advising you of this:
  547.  
  548.     Program Terminated: Restart
  549.  
  550.  
  551.     7 Command Line Arguments
  552.     ─────────────────────────────────────────────────────────────────────
  553.  
  554.     The command line format for MegaDebugger is:
  555.  
  556.     MMD [options] [target [arguments]]
  557.  
  558.       ■ options
  559.  
  560.       /?, /H  Command line help.
  561.  
  562.       /C<file> Use configuration file.
  563.  
  564.     Forces a specific configuration file to be loaded.  MMD will
  565.     automatically load a configuration file called 'MMD.CFG' in the
  566.     default directory, but other files with other names must be
  567.     directly specified.
  568.  
  569.       /D      DOS redirectable output.
  570.  
  571.     Specifying DOS output mode will disable the screen swapping and
  572.     use DOS functions for both input and output.  These DOS
  573.     functions do not support function keys so all input will be
  574.     through the command line.  The primary advantage of this mode is
  575.     that the input and output of MMD can be redirected using the DOS
  576.     redirection commands.  MMD uses around 10k less memory because
  577.     the screen saving buffers are not required.
  578.  
  579.       /DO, /2 Dual Monitor output.
  580.  
  581.     Redirects all MMD output to the monochrome screen on a system
  582.     with two monitors.
  583.  
  584.     │    Untested: I did not have the necessary equipment to actually
  585.     │    try this out but have tested it as far as possible, could
  586.     │    someone let me know if they can use it with their system.
  587.  
  588.       /Hxx    Set screen height: 25,28,43,50.
  589.  
  590.     This switch is relevant only for EGA and VGA systems, where the
  591.     number of lines in a text screen can be varied.  By default
  592.     MegaDebugger will use the same number of screen lines that the
  593.     current text screen has, but this switch allows you to override
  594.     this and use a specific screen size.
  595.  
  596.     Increasing the size of the screen also increases the size of the
  597.     buffer required by MegaDebugger for screen swapping.  You can
  598.     view the difference by examining the size of the debugger memory
  599.     block with the Memory Information command.
  600.  
  601.     In DOS output mode this switch has no effect.
  602.  
  603.       /H[±]   Include or exclude online help.
  604.  
  605.     Disables loading of the MMD help file.    Although compressed is
  606.     still quite large and this option allows loading of the help
  607.     file to be disabled, decreasing the amount of memory required by
  608.     MMD.  Help will still be available through the command line
  609.     ?;Help command.
  610.  
  611.       /I[±]   Allow DOS process ID switching.
  612.  
  613.     MMD attempts to have as little to do with DOS as possible,
  614.     however when writing files from MMD it is wise (though not
  615.     necessary) to enable PSP switching.
  616.  
  617.     │     Note: MMD does not have a critical error handler so any
  618.     │     any errors occurring when writing a file with
  619.     │     or W will be passed to the target's handler, if it has one.
  620.  
  621.       /KD[±]  Keep keyboard interrupt thru DOS.
  622.  
  623.     Many programs install a new keyboard interrupt (Int09) meaning
  624.     that the MMD keyboard handler cannot interrupt the target
  625.     program.  MMD will attempt to 'keep' the keyboard interrupt by
  626.     intercepting any DOS Set Interrupt Vector (Int21/AH=25h) calls
  627.     that would change the Int09 vector and installs its own handler
  628.     which chains to the requested new handler.
  629.  
  630.       /KP[xx][±] Keep keyboard interrupt thru PIC.
  631.  
  632.     This option attempts to keep the keyboard by reprogramming the
  633.     Programmable Interrupt Controller (PIC) to generate an interrupt
  634.     other than Int09 when a key is pressed.  A program installing a
  635.     new handler for interrupt 09h will be unaware that MMD is using
  636.     a different set of interrupts.    As MMD controls these new
  637.     interrupts it can check for a keyboard break before chaining to
  638.     the target's Int09 handler.  This method ensures that a
  639.     keyboard break can always be detected as long as the keyboard
  640.     IRQ is enabled.  However reprogramming the PIC has two
  641.     drawbacks, firstly a series of 8 consecutive interrupts must be
  642.     available for the new interrupts.  In most systems there is
  643.     usually such a range between interrupts 78h - EFh.  The default
  644.     interrupt range is D8h-DFh, but MMDCFG should be used to verify
  645.     that this or any other range is free before it is used.  The
  646.     second problem is that redirecting the interrupts may interfere
  647.     with a protected mode environment which has usually already
  648.     shifted the interrupts.  If VCPI or DPMI is detected then MMD
  649.     will notify them of the change.
  650.  
  651.       /Kx     Key definitions; B:Borland, M:Microsoft.
  652.  
  653.     By default MegaDebugger uses CodeView key definitions, but if
  654.     you are more familiar with Turbo Debugger or any of the Borland
  655.     Integrated Development Environments then this switch will
  656.     redefine the function keys (although there are some differences
  657.     between individual Borland and Microsoft products, see Section
  658.     10 for MMD key definitions).
  659.  
  660.       /S      Screen swapping, no windows.
  661.  
  662.     This switch will disable the Window output mode of MMD and
  663.     produce line orientated output similar to the DOS output mode.
  664.     However screen swapping and function keys will still be active.
  665.     This conserves memory by not having to load the window code and
  666.     buffers.
  667.  
  668.       /Lx     Expression language; A:Assembler, P:Pascal, C:C, 8:A86.
  669.  
  670.     MegaDebugger supports expression operators from four different
  671.     languages: C, Pascal, Assembler and A86.  By default Assembler
  672.     operators will be used.
  673.  
  674.       /Vx     Screen swapping type; S:Standard, B:VGABIOS, R:Register.
  675.  
  676.     Sets the method MMD uses for swapping screens.    Standard mode
  677.     uses several BIOS functions and adaptor registers to swap
  678.     screens.  VGABIOS mode uses the VGA BIOS Save and Restore state
  679.     functions, it was written only out of curiosity and was
  680.     extremely slow on my system.  Register level is the most
  681.     powerful method, it swaps modes by reading and writing all the
  682.     registers directly, so can support mode-x and split screens but
  683.     not SVGA modes.  Register level swapping is supported on MDA,
  684.     CGA and VGA systems.
  685.  
  686.     │
  687.     │  Do NOT use register level swapping if the target program may use SVGA
  688.     │    screen modes.  All SuperVGA modes are controlled by extended set of
  689.     │    chipset specific registers, which MMD's register level swapping is
  690.     │    not aware of.  Therefore when swapping between the target screen and
  691.     │    MMD only the standard VGA registers will be saved and restored,
  692.     │    leaving the extended registers in an undetermined state.
  693.     │
  694.     │  *** USING REGISTER LEVEL SWAPPING WITH SVGA MODES MAY DAMAGE YOUR ***
  695.     │  *** MONITOR OR GRAPHICS CARD.                     ***
  696.     │
  697.     │  All other MMD swapping modes (Standard and VGA BIOS) are completely
  698.     │    safe to use in all screen modes.
  699.     │
  700.  
  701.       /VG[±]  Enable complete EGA/VGA graphics save.
  702.  
  703.     By default MMD will not save and restore video memory used for
  704.     the character set.  In standard text modes and some graphics
  705.     modes this is acceptable but in graphics modes and some custom
  706.     text modes it will corrupt the screen.    Enabling a complete
  707.     graphics save requires 4k more memory.
  708.  
  709.       /VN[±]  Disable higher mode sets.
  710.  
  711.     MMD can allow its screen height to be changed from the command
  712.     prompt, however this requires additional buffers to save the
  713.     largest screen size possible, even if it is not used.
  714.  
  715.       /VP[±]  Enable VGA palette saving.
  716.  
  717.     MMD saves and restores the palette information.  Uses about 1k
  718.     extra memory.
  719.  
  720.       ■ target
  721.  
  722.     This specifies the name of the file you wish to debug.    An
  723.     extension is not required for the file name if the file is .COM
  724.     or .EXE type because MMD will try both extensions when searching
  725.     for the target file.  The first attempt will be for a .COM
  726.     extension and then .EXE, which is the same order that DOS
  727.     searches for an executable file.  In window mode the file name
  728.     and path of the target file are displayed at the top of the
  729.     screen.  MMD does not allow the target file to be changed once
  730.     it is loaded.
  731.  
  732.       ■ arguments
  733.  
  734.     This is the command line you wish to run the target program with
  735.     when MegaDebugger loads it.  The command line can be changed
  736.     with L;Reload Target command.
  737.  
  738.  
  739.     8 Command Reference
  740.     ─────────────────────────────────────────────────────────────────────
  741.  
  742.       Command Parameters
  743.  
  744.     - Address: An address can consist of just an offset, in which
  745.       case the command will use a default value (either DS or CS
  746.       depending on which command) for the segment, or both the
  747.       segment and offset values.  In this case the segment and
  748.       offset must be separated by the segment override character (a
  749.       colon ':').
  750.  
  751.     - Byte: A byte value is an 8-bit expression.
  752.  
  753.     - Command line: The command line is simply a string of
  754.       characters which will be passed to the target program as its
  755.       command line argument.
  756.  
  757.     - Comment: A comment string is simply a string of characters.
  758.  
  759.     - Count: A count is simply a expression that will evaluate to a
  760.       word.
  761.  
  762.     - Expression: An expression can be supplied as defined in the
  763.       Expressions section, however the segment override operator is
  764.       also allowed.
  765.  
  766.     - Format: A format character defines how the output of the
  767.       command is to be displayed.  MegaDebugger uses the following
  768.       format characters:
  769.  
  770.          A      ASCII string
  771.          B      Byte
  772.          C      Character
  773.          D      Double Word
  774.          I      Decimal integer
  775.          L      Long Integer
  776.          U      Unsigned decimal integer
  777.          W      Word
  778.  
  779.     - List: A list is a set of numbers between 0 and 9, or * to
  780.       specify all numbers from 0-9.
  781.  
  782.     - Port: A port address is the number of one of 65,355 I/O ports
  783.       available on PC computers.
  784.  
  785.     - Range: A range consists of two addresses, or a single address
  786.       and a length specifier.  Only the first address may have a
  787.       segment specified.  In some commands the range is optional and
  788.       only the address may have to be supplied.  To specify an
  789.       entire segment in a range a length of 0 should be given.
  790.  
  791.     - Register: Any 16-bit register name, as well as the flags (FL)
  792.       register.
  793.  
  794.     - Values: A set of bytes and strings separated by spaces.  The
  795.       strings must be delimited by matching (') or (") characters.
  796.       To specify one of these characters as an element of the string
  797.       use either double delimiters 'it''s', or use the other type of
  798.       delimiter to delimit the string, "it's".  The ASCII values of
  799.       the characters in the string are used as byte values.
  800.  
  801.     Current Location
  802.     ──────────────────────────────────────────────────────────────
  803.     .
  804.  
  805.     This command will return the Assembler window highlight cursor
  806.     bar, which represents the address of CS:IP, to the top of the
  807.     screen.
  808.  
  809.       SeeAlso: Ctrl-O;Origin.
  810.  
  811.  
  812.     Help
  813.     ──────────────────────────────────────────────────────────────
  814.     ?, H
  815.  
  816.     Displays a brief summary of all MMD commands and their
  817.     parameters.  Unlike the help window this command is always
  818.     available, in all output modes and when the context sensitive
  819.     online help window is not included.
  820.  
  821.       SeeAlso: F1;Help.
  822.  
  823.  
  824.     Evaluate Expression
  825.     ──────────────────────────────────────────────────────────────
  826.     ? expression[,format]
  827.  
  828.     This is essentially a calculator, any expression given will be
  829.     evaluated and displayed.  The optional format character allows
  830.     the result to be displayed in a format other than the default,
  831.     which is a hexadecimal word.
  832.  
  833.       SeeAlso: Configuration;Default Expression Format.
  834.  
  835.  
  836.     Assemble Instructions
  837.     ──────────────────────────────────────────────────────────────
  838.     A [address]
  839.  
  840.     Assembles instructions directly into memory. This is similar to
  841.     the DEBUG assembler with the following enhancements:
  842.  
  843.     - Inline overrides are supported, eg: REP MOVSB and MOV
  844.       AL,ES:[SI].
  845.  
  846.     - Most real mode 286 instructions are available.
  847.  
  848.     - Directives ORG, DB and DW.
  849.  
  850.     The default segment is the current CS.
  851.  
  852.     Math coprocessor instructions are not supported.
  853.  
  854.       SeeAlso: Ctrl-P;NOP Instruction.
  855.  
  856.  
  857.     Set a Breakpoint
  858.     ──────────────────────────────────────────────────────────────
  859.     BP [address] [count][,expression]
  860.  
  861.     MegaDebugger supports 10 user breakpoints.  These can be set at
  862.     any address in memory, except that of another breakpoint.  If at
  863.     any point the computer executes the instruction at the address
  864.     of a breakpoint the program will be interrupted and MMD will
  865.     regain control.
  866.  
  867.     If no address is specified then it will default to the current
  868.     CS:IP.
  869.  
  870.     The optional count allows the breakpoint to be passed a number
  871.     of times before it will interrupt the program's execution. This
  872.     is particularly useful when the breakpoint is placed inside a
  873.     loop. Each time the breakpoint is executed the pass count is
  874.     decremented, until it reaches 1 when the breakpoint becomes the
  875.     same as an ordinary breakpoint with no pass count.  The only way
  876.     to clear a pass count is by manually clearing and resetting the
  877.     breakpoint.
  878.  
  879.       SeeAlso: F9;Toggle Breakpoint.
  880.  
  881.  
  882.     Clear Breakpoints
  883.     ──────────────────────────────────────────────────────────────
  884.     BC list
  885.  
  886.     Clearing a breakpoint will remove it from the list of
  887.     breakpoints that MMD maintains and discards it.
  888.  
  889.     Multiple breakpoint numbers may be specified in the list
  890.     parameter and all will be removed.
  891.  
  892.       SeeAlso: F9;Toggle Breakpoint.
  893.  
  894.  
  895.     Disable Breakpoints
  896.     ──────────────────────────────────────────────────────────────
  897.     BD list
  898.  
  899.     Disabling a breakpoint removes their effect but still keeps them
  900.     in the list of breakpoints.  This allows then to be reenabled at
  901.     a later point, which is faster and more convenient then
  902.     clearing and resetting a breakpoint.
  903.  
  904.     Disabled breakpoints will be displayed in the Breakpoint List
  905.     command with the letter D beside its entry.  In the Assembler
  906.     window a disabled breakpoint will be the same colour as the
  907.     text, and not highlighted.
  908.  
  909.  
  910.     Enable Breakpoints
  911.     ──────────────────────────────────────────────────────────────
  912.     BE list
  913.  
  914.     After having disabled a breakpoint you may reactivate it using
  915.     this command.  Enabling a breakpoint that is already enabled
  916.     will have no effect on that breakpoint.
  917.  
  918.  
  919.     List all Breakpoints
  920.     ──────────────────────────────────────────────────────────────
  921.     BL
  922.  
  923.     The list of breakpoints displays the address, status, and pass
  924.     count for all current breakpoints.
  925.  
  926.     The pass count is displayed as a decimal integer rather than a
  927.     hexadecimal number.
  928.  
  929.  
  930.     Compare Memory
  931.     ──────────────────────────────────────────────────────────────
  932.     C range address
  933.  
  934.     Compares all bytes in the range to those starting at address,
  935.     and displays any of the differences.  For each difference found
  936.     MMD will display the address and the bytes that differ.
  937.  
  938.     If the two areas are identical then there will be no display.
  939.  
  940.  
  941.     Dump Memory
  942.     ──────────────────────────────────────────────────────────────
  943.     D[format] [range]
  944.  
  945.     Dumps memory in the range specified to the screen in the format
  946.     specified.  If no range is specified then the dump will continue
  947.     from the last address previously displayed.
  948.  
  949.     There should be no space between the command name and the format
  950.     character, or the format will be interpreted as part of the
  951.     range address.    The range should also be separated from the
  952.     command name by a space, to prevent the address being
  953.     interpreted as a format character.
  954.  
  955.     The character format, 'C' is not supported in the Dump Memory
  956.     command, instead the byte format will display an ASCII character
  957.     translation of each byte it displays.
  958.  
  959.  
  960.     Enter
  961.     ──────────────────────────────────────────────────────────────
  962.     E address [values]
  963.  
  964.     This command enters bytes directly into the memory at address.
  965.  
  966.     If no values are specified then an interactive mode is started.
  967.     In this mode you will be prompted with the current address and
  968.     the current value for that byte.  You then have four choices:
  969.  
  970.     - Enter a new value for the byte
  971.  
  972.     - Press the space bar to advance to the next byte.
  973.  
  974.     - Press the minus (-) key to move back to the preceding address.
  975.  
  976.     - Press Enter which will terminate the interactive mode.
  977.  
  978.  
  979.     Fill Memory
  980.     ──────────────────────────────────────────────────────────────
  981.     F range values
  982.  
  983.     Fills the memory within the range with the values specified.
  984.  
  985.     If the range is larger than the size of the values then the
  986.     values will be repeated until they fill the range.  When the
  987.     size if the range is smaller than the values then the values
  988.     will be truncated to fill only the range specified.
  989.  
  990.  
  991.     Go
  992.     ──────────────────────────────────────────────────────────────
  993.     G [address] {address}
  994.  
  995.     This command will execute the target program, which will
  996.     continue to run until it terminates, executes a breakpoint or is
  997.     interrupted by a keyboard break.
  998.  
  999.     If the address is specified then a breakpoint will be set at
  1000.     that address, which is in the current code segment by default.
  1001.     This breakpoint is only temporary, and is not added to the user
  1002.     breakpoint list, and it will be lost when the control returns to
  1003.     MMD.
  1004.  
  1005.       SeeAlso: F5;Run.
  1006.  
  1007.  
  1008.     Set Screen Height
  1009.     ──────────────────────────────────────────────────────────────
  1010.     H25, H28, H43, H50
  1011.  
  1012.     Sets the MMD screen height, if allowed by the video card and
  1013.     command line options.
  1014.  
  1015.       SeeAlso: /VN command line switch
  1016.  
  1017.  
  1018.     Input Byte from Port
  1019.     ──────────────────────────────────────────────────────────────
  1020.     I port
  1021.  
  1022.     This command will read the current value from the I/O port
  1023.     specified and displays it.
  1024.  
  1025.  
  1026.     Reload Target
  1027.     ──────────────────────────────────────────────────────────────
  1028.     L [arguments]
  1029.  
  1030.     Reloading the program will terminate the program that is
  1031.     currently executing and reload the target file from disk.  It
  1032.     will then be ready to start execution again from the beginning
  1033.     of the program.
  1034.  
  1035.     If no command line is specified then MMD will reuse the current
  1036.     command line.  To specify no command line type a single space
  1037.     character after the command name.
  1038.  
  1039.  
  1040.     Memory Information
  1041.     ──────────────────────────────────────────────────────────────
  1042.     M[ | A | I | H | V ]
  1043.  
  1044.     The output of this command is similar to the DOS MEM command.
  1045.     There are five options available:
  1046.  
  1047.     - The default is a list of all the system and program memory
  1048.       blocks.  Environment blocks will not be displayed.
  1049.  
  1050.     - A All memory information will be displayed, including
  1051.       interrupts and file information.
  1052.  
  1053.     - I Interrupt information will be displayed for the main memory
  1054.       blocks.
  1055.  
  1056.     - H Provides information about any open files for program memory
  1057.       blocks.
  1058.  
  1059.     - V Verbose mode displays all memory blocks.
  1060.  
  1061.     File information provides information about files opened with
  1062.     file handles (not FCBs) and relies on undocumented DOS
  1063.     structures to find the names of the files, and so it is
  1064.     sensitive to changes between DOS versions.
  1065.  
  1066.  
  1067.     Move Memory
  1068.     ──────────────────────────────────────────────────────────────
  1069.     M range address
  1070.  
  1071.     This command will copy the block of memory in the range to the
  1072.     destination address.
  1073.  
  1074.     If the blocks overlap then MMD will ensure that the move is
  1075.     performed without losing any of the data.
  1076.  
  1077.  
  1078.     Set Radix
  1079.     ──────────────────────────────────────────────────────────────
  1080.     N2, N8, N10, N16
  1081.  
  1082.        Changes the current radix for input values.
  1083.  
  1084.       SeeAlso: Configuration;Default Radix.
  1085.  
  1086.  
  1087.     Output Byte to Port
  1088.     ──────────────────────────────────────────────────────────────
  1089.     O port byte
  1090.  
  1091.     This command will output the byte value to the I/O port.
  1092.  
  1093.  
  1094.     Set Option
  1095.     ──────────────────────────────────────────────────────────────
  1096.     O[B | U][+ | -]
  1097.  
  1098.     Sets an option:
  1099.  
  1100.     - OB enables or disables byte decoding display in the Assembler
  1101.       window.
  1102.  
  1103.     - OU toggles between upper and lower case display.
  1104.  
  1105.       SeeAlso: Configuration;Byte Decoding, Configuration;Unassembly Case.
  1106.  
  1107.  
  1108.     Proceed
  1109.     ──────────────────────────────────────────────────────────────
  1110.     P [count]
  1111.  
  1112.     The proceed command is similar to the trace command, however it
  1113.     will step over loops, calls and repeated string instructions.
  1114.  
  1115.     When the optional count is used then proceed will execute count
  1116.     number of times before returning to user input.  The debugger
  1117.     display will be updated for each instruction executed during the
  1118.     count.
  1119.  
  1120.     The proceed command will not work in ROM.
  1121.  
  1122.     The following instructions will be stepped over by this command:
  1123.  
  1124.     - CALL
  1125.  
  1126.     - LOOP, LOOPZ, LOOPNZ
  1127.  
  1128.     - REPx SCASx, REPx LODSx, REPx STOSx, REPx CMPSx, REPx MOVSx
  1129.  
  1130.     - REPx INSx, REPx OUTSx
  1131.  
  1132.  
  1133.     Quit
  1134.     ──────────────────────────────────────────────────────────────
  1135.     Q
  1136.  
  1137.     This command will terminate the target program, and quit from
  1138.     MegaDebugger to DOS.
  1139.  
  1140.  
  1141.     Register
  1142.     ──────────────────────────────────────────────────────────────
  1143.     R [register] [expression]
  1144.  
  1145.     The Register command allows you to set new values for any of the
  1146.     processor register and flags.
  1147.  
  1148.     If no expression is given for the register then MMD will display
  1149.     the current value and prompt you for a new one. You may enter a
  1150.     new value for the string or ignore it and leave the contents of
  1151.     the register unchanged by pressing Enter.
  1152.  
  1153.     If no parameters are supplied to this command then it will dump
  1154.     the current values for the registers to the screen.
  1155.  
  1156.     To modify the flags the FL register name should be given, again
  1157.     you may either specify the new value directly or be prompted
  1158.     with a display of the current flag settings.
  1159.  
  1160.  
  1161.     Search Memory
  1162.     ──────────────────────────────────────────────────────────────
  1163.     S range values
  1164.  
  1165.     Searches all the memory in the range for the sequence of values
  1166.     specified.  For each match MMD will display the address of that
  1167.     match.
  1168.  
  1169.     If the values are not found then there will be no display.
  1170.  
  1171.  
  1172.     Set Swapping Mode
  1173.     ──────────────────────────────────────────────────────────────
  1174.     S[ | S | + | - ]
  1175.  
  1176.     This command controls the screen swapping.  There are three
  1177.     options:
  1178.  
  1179.     - The default is to display the current status of the screen
  1180.       swapping: on, off, or smart.
  1181.  
  1182.     - S Sets smart swapping.
  1183.  
  1184.     - + Will turn screen swapping on.
  1185.  
  1186.     - - Will turn screen swapping off.
  1187.  
  1188.       SeeAlso: Alt-S;Toggle Swapping.
  1189.  
  1190.  
  1191.     Trace
  1192.     ──────────────────────────────────────────────────────────────
  1193.     T [count]
  1194.  
  1195.     Single steps one instruction in the target.
  1196.  
  1197.       SeeAlso: F8;Trace.
  1198.  
  1199.  
  1200.     Unassemble
  1201.     ──────────────────────────────────────────────────────────────
  1202.     U [address]
  1203.  
  1204.     This command will disassemble the program memory at the
  1205.     specified address and display it as processor instructions.  MMD
  1206.     can disassemble all 8086 instructions, most real mode 286
  1207.     instructions and all non-32 bit 387 co-processor instructions
  1208.  
  1209.     When in window mode all the output will be in the Unassemble
  1210.     window.
  1211.  
  1212.     The default segment for the address is the current code segment.
  1213.  
  1214.  
  1215.     View Output Screen
  1216.     ──────────────────────────────────────────────────────────────
  1217.     V, \
  1218.  
  1219.     In screen swapping modes this command will switch to the output
  1220.     screen.  MMD will then wait for a key to be pressed before
  1221.     returning to the debugger display.
  1222.  
  1223.       SeeAlso: F4;View Output Screen.
  1224.  
  1225.  
  1226.     List Watch
  1227.     ──────────────────────────────────────────────────────────────
  1228.     W
  1229.  
  1230.     The List Watch command will display all the current watches,
  1231.     their results and any comments that are defined for them.
  1232.  
  1233.  
  1234.     Write File
  1235.     ──────────────────────────────────────────────────────────────
  1236.     W "filename" range
  1237.  
  1238.     Writes the memory in the range to the specified file.
  1239.  
  1240.  
  1241.     Watch Memory
  1242.     ──────────────────────────────────────────────────────────────
  1243.     W[format] range [; comment]
  1244.  
  1245.     This will add an area of memory to the watch list.  The same
  1246.     comments apply to the format and range as in the Dump Memory
  1247.     command.  The default dump size is one byte and the default
  1248.     format is a hexadecimal word.
  1249.  
  1250.     The comment is an optional section of text that can be used as a
  1251.     simple description of the memory region being watched to serve
  1252.     as a reminder to you.
  1253.  
  1254.       SeeAlso: Y;DeleteWatch
  1255.  
  1256.  
  1257.     Watch an Expression
  1258.     ──────────────────────────────────────────────────────────────
  1259.     W? expression[,format] [; comment]
  1260.  
  1261.     This command will add an expression to the Watch list.    The
  1262.     style of this expression is identical to that of the Evaluate
  1263.     Expression command.
  1264.  
  1265.     If the expression cannot be evaluated by MMD then it will not be
  1266.     added to the watches.
  1267.  
  1268.     The comment is an optional line of text that can be used as a
  1269.     simple description of the expression being watched to serve as a
  1270.     reminder.
  1271.  
  1272.       SeeAlso: Y;Delete Watch
  1273.  
  1274.  
  1275.     Write Listing
  1276.     ──────────────────────────────────────────────────────────────
  1277.     WL "filename" range
  1278.  
  1279.     Writes the unassembly listing of the memory in the range to a
  1280.     text file.  This will be a text file with the same formatting as
  1281.     the current unassembly options.
  1282.  
  1283.       SeeAlso: OB;Byte Decoding OC; Unassembly case.
  1284.  
  1285.  
  1286.     Set WatchPoint (Global Breakpoint)
  1287.     ──────────────────────────────────────────────────────────────
  1288.     WP? expression[,format] [; comment]
  1289.  
  1290.     Sets a watchpoint, when the program is running it is put into
  1291.     single step mode and the expression is evaluated on each
  1292.     instruction executed.  When it becomes true the program will be
  1293.     interrupted.  Another use of the watchpoint command is to slow
  1294.     execution of the target.
  1295.  
  1296.       SeeAlso: Y;Delete Watch
  1297.  
  1298.  
  1299.     Delete Watch
  1300.     ──────────────────────────────────────────────────────────────
  1301.     Y list
  1302.  
  1303.     Deletes any watches from the current watches
  1304.  
  1305.  
  1306.     9 Configuration
  1307.     ─────────────────────────────────────────────────────────────────────
  1308.  
  1309.     9.1 MMDCFG
  1310.  
  1311.     MMDCFG can be used to configuration MMD.
  1312.  
  1313.     Each project (if they are in separate directories) can have
  1314.     different default configurations as appropriate.
  1315.  
  1316.     During initialising MMD will search for a configuration file
  1317.     called 'MMD.CFG', a different configuration file can be given
  1318.     with the /C command line option.  When initialising MMD
  1319.     determines its configuration in the following order of priority:
  1320.  
  1321.     Options given on the MMD command line will override any default
  1322.     of configuration file settings.
  1323.  
  1324.     - A specific configuration file given with the /C command line
  1325.       option.
  1326.  
  1327.     - A CFG file in the current directory.
  1328.  
  1329.     - A CFG file in the same directory as MMD.EXE.
  1330.  
  1331.     - If no configuration file is found then MMD will use the
  1332.       options saved inside its EXE file.
  1333.  
  1334.     MMDCFG menus:
  1335.  
  1336.       ■ Debugging
  1337.  
  1338.       Keyboard Keeper: None, DOS, PIC
  1339.  
  1340.       SeeAlso: /KP, /KD.
  1341.  
  1342.  
  1343.       PIC Keeper IRQ Base
  1344.  
  1345.     This option displays the current interrupt vectors for the
  1346.     chosen new IRQ base.  All entries in the selected range must be
  1347.     marked Unused, MMD will allow you to select any range but if the
  1348.     interrupts are being used by other software then conflicts will
  1349.     occur.
  1350.  
  1351.       SeeAlso: /KP.
  1352.  
  1353.  
  1354.       Switch DOS PID: On, Off.
  1355.  
  1356.       SeeAlso: /I
  1357.  
  1358.  
  1359.       Expression Language: Assembler, A86, C, Pascal
  1360.  
  1361.       SeeAlso: /L
  1362.  
  1363.  
  1364.       Default Radix: 2, 8, 10, 16
  1365.  
  1366.       SeeAlso: N;Set Radix
  1367.  
  1368.  
  1369.       Default Expression Format: Hex, Unsigned, Decimal
  1370.  
  1371.     Sets the default output format for the ?; Evaluate expression
  1372.     command.
  1373.  
  1374.  
  1375.       ■ Screen
  1376.  
  1377.       Screen Height: Default, 25, 28, 43 ,50
  1378.  
  1379.       SeeAlso: /H, H;Set Screen Height.
  1380.  
  1381.  
  1382.       Restrict Height changes: On,Off
  1383.  
  1384.       SeeAlso: /VN
  1385.  
  1386.  
  1387.       Default Output Mode: Window, Screen, DOS
  1388.  
  1389.       SeeAlso: /S, /D
  1390.  
  1391.  
  1392.       Default Swapping Mode: Smart, On, Off
  1393.  
  1394.       SeeAlso: S;Set Swapping Mode
  1395.  
  1396.  
  1397.       Default Swapping Type: Standard, Register, VGABIOS, Dual
  1398.  
  1399.       SeeAlso: /VS, /VR, /VR, /VB, /Do, /2
  1400.  
  1401.  
  1402.       VGA Palette Saving: On,Off
  1403.  
  1404.       SeeAlso: /VP
  1405.  
  1406.  
  1407.       EGA/VGA Complete Save: On,Off
  1408.  
  1409.       SeeAlso: /VG
  1410.  
  1411.  
  1412.       Byte Decoding: On, Off
  1413.  
  1414.       SeeAlso: OB;Set Option: Byte Decoding.
  1415.  
  1416.  
  1417.       Unassembly Case: Upper, Lower
  1418.  
  1419.       SeeAlso: OU;Set Option: Unassembly Case.
  1420.  
  1421.  
  1422.       Horizontal Register Window: Open, Close
  1423.  
  1424.       SeeAlso: Ctrl+F2;Toggle Horizontal Register Window.
  1425.  
  1426.  
  1427.       Vertical Register Window: Open, Close
  1428.  
  1429.       SeeAlso: F2;Toggle Vertical Register Window.
  1430.  
  1431.  
  1432.       Online Help: Include, Exclude
  1433.  
  1434.       SeeAlso: /H
  1435.  
  1436.  
  1437.       ■ Keys
  1438.  
  1439.       Key Definitions: Microsoft, Borland, Custom
  1440.  
  1441.     The keys menu allows you to set the default MMD key definitions
  1442.     to the Microsoft, Borland or a Custom setup.
  1443.  
  1444.       SeeAlso: /KM, /KB.
  1445.  
  1446.       Break key
  1447.  
  1448.     Sets the MMD keyboard break combination.  By default this will
  1449.     be Ctrl-Break (Note that MMD distinguishes between Ctrl-Break
  1450.     and Ctrl-C, this allows Ctrl-C to be used when a DOS break is
  1451.     specifically required).  Any key combination can be used as the
  1452.     MMD keyboard break, if the key has a non standard scan code
  1453.     (such as enhanced keyboards which have extra keys such as Macro)
  1454.     then MMDCFG will display the hexadecimal scan code it received.
  1455.  
  1456.     Customise Keys
  1457.  
  1458.     Selecting the Customise keys displays a screen with a list of
  1459.     all MMD functions.  To change a key definition select the
  1460.     function you wish to assign a new key to and then press the
  1461.     desired key.  If the key does not change then it has already
  1462.     assigned or is key that has a fixed definition.  Customise Key
  1463.     will initially display the current key selection for
  1464.     modification which is Microsoft, to base the modifications on
  1465.     Borland key definitions select Borland keys before enterring
  1466.     Customise Keys.
  1467.  
  1468.       ■ Colours
  1469.  
  1470.     Allows the MMD screen colours to be set.
  1471.  
  1472.       ■ Directory
  1473.  
  1474.     This is only required if MMD is running under DOS version 2.0 or
  1475.     below, with later versions of DOS MMD is able to determine the
  1476.     directory it was loaded from and search for a CFG file there.
  1477.     Alternatively this option can be used to specify any directory
  1478.     that MMD should search for a CFG file.
  1479.  
  1480.       ■ Save
  1481.  
  1482.     Saves the changes to a CFG file or into MMD.EXE.  Note that if
  1483.     the options are written to the MMD executable they cannot be
  1484.     reloaded, so if they require further editing they should also be
  1485.     saved to a separate CFG file.
  1486.  
  1487.  
  1488.     10 Default Key Definitions
  1489.     ─────────────────────────────────────────────────────────────────────
  1490.  
  1491.     10.1 Default Microsoft Keys
  1492.  
  1493.     Key            Definition
  1494.     ──────────────────────────────────────────────────────────────
  1495.     Command Line Editing.
  1496.     Escape           Clear command line
  1497.     Left
  1498.     Right
  1499.     F3           Replay Command
  1500.  
  1501.     Screen Keys.
  1502.     F4           View Output Screen
  1503.     Alt+S           Toggle Screen Swapping
  1504.  
  1505.     Window Keys.
  1506.     Up           Cursor up
  1507.     Down           Cursor down
  1508.     PgUp           Scroll up one screen.
  1509.     PgDn           Scroll down one screen.
  1510.     Shift+Up       Move secondary window up one line
  1511.     Shift+Down     Move secondary window down one line
  1512.     Shift+PgUp     Scroll secondary window up one screen
  1513.     Shift+PgDn     Scroll secondary window down one screen
  1514.     Ctrl+Home      Cursor to Top
  1515.     Ctrl+End       Cursor to Bottom
  1516.  
  1517.     Window Control.
  1518.     F2           Toggle Vertical Register Window
  1519.     F6           Change Window
  1520.     Ctrl+F2        Toggle Horizontal Register Window
  1521.     Ctrl+G           Expand Command Window
  1522.     Ctrl+T           Shrink Command Window
  1523.  
  1524.     Assembler Window.
  1525.     Ctrl+Right     Byte Adjust Up
  1526.     Ctrl+Left      Byte Adjust Down
  1527.     Ctrl+N           New CS:IP
  1528.     Ctrl+O           Origin
  1529.     Ctrl+P           NOP Instruction
  1530.  
  1531.     Debugging.
  1532.     F5           Go
  1533.     F7           Go To Cursor
  1534.     F8           Trace
  1535.     F9           Toggle Breakpoint
  1536.     F10           Proceed
  1537.  
  1538.     Help.
  1539.     F1           Help
  1540.     Tab           Next Topic Link
  1541.     Alt+B           Sequential Next Topic
  1542.     Alt+F           Sequential Previous Topic
  1543.     Alt+F1           Previous Topic
  1544.     Ctrl+F1        Next Topic
  1545.     ──────────────────────────────────────────────────────────────
  1546.  
  1547.  
  1548.     10.2 Default Borland Keys
  1549.  
  1550.     Key            Definition
  1551.     ──────────────────────────────────────────────────────────────
  1552.     Command Line Editing.
  1553.     Escape           Clear command line
  1554.     Left
  1555.     Right
  1556.     F3           Replay Command
  1557.  
  1558.     Screen Keys.
  1559.     Alt+S           Toggle Screen Swapping
  1560.     Alt+F5           View Output Screen
  1561.  
  1562.     Window Keys.
  1563.     Up           Cursor up
  1564.     Down           Cursor down
  1565.     PgUp           Scroll up one screen.
  1566.     PgDn           Scroll down one screen.
  1567.     Shift+Up       Move secondary window up one line
  1568.     Shift+Down     Move secondary window down one line
  1569.     Shift+PgUp     Scroll secondary window up one screen
  1570.     Shift+PgDn     Scroll secondary window down one screen
  1571.     Ctrl+Home      Cursor to Top
  1572.     Ctrl+End       Cursor to Bottom
  1573.  
  1574.     Window Control.
  1575.     F6           Change Window
  1576.     Ctrl+F2        Toggle Horizontal Register Window.
  1577.     Alt+F2           Toggle Vertical Register Window.
  1578.     Ctrl+G           Expand Command Window
  1579.     Ctrl+T           Shrink Command Window
  1580.  
  1581.     Assembler Window.
  1582.     Ctrl+Right     Byte Adjust Up
  1583.     Ctrl+Left      Byte Adjust Down
  1584.     Ctrl+O           Origin
  1585.     Ctrl+N           New CS:IP
  1586.     Ctrl+P           NOP Instruction
  1587.  
  1588.     Debugging.
  1589.     F2           Toggle Breakpoint
  1590.     F4           Go To Cursor
  1591.     F7           Trace
  1592.     F8           Proceed
  1593.     F9           Run
  1594.  
  1595.     Help.
  1596.     F1           Help
  1597.     Tab           Next Topic Link
  1598.     Ctrl+F1        Next Topic
  1599.     Alt+F1           Previous Topic
  1600.     Alt+B           Sequential Next Topic
  1601.     Alt+F           Sequential Previous Topic
  1602.     ──────────────────────────────────────────────────────────────
  1603.  
  1604.  
  1605.     11 Operator Precedence Reference
  1606.     ─────────────────────────────────────────────────────────────────────
  1607.  
  1608.     These tables summarise the various operators supported by
  1609.     MegaDebugger.  These operators are listed in decreasing
  1610.     precedence, and operators that are grouped together have the
  1611.     same precedence.  All the languages support the use of
  1612.     parentheses.  None of the memory reference operators are
  1613.     supported by MMD (assembler [] or C * ).
  1614.  
  1615.     11.1 Assembler Language Operators
  1616.  
  1617.     Operator       Description
  1618.     ──────────────────────────────────────────────────────────────
  1619.     -           Unary Minus
  1620.     +           Unary Plus
  1621.     NOT           Bitwise NOT
  1622.     ───────────────────────────────────────────────
  1623.     *           Multiplication
  1624.     /           Division
  1625.     MOD           Modulus
  1626.     SHL           Left shift
  1627.     SHR           Right shift
  1628.     ───────────────────────────────────────────────
  1629.     +           Addition
  1630.     -           Subtraction
  1631.     ───────────────────────────────────────────────
  1632.     EQ           Equality
  1633.     NE           Inequality
  1634.     LT           Less than
  1635.     LE           Less than or equal to
  1636.     GT           Greater than
  1637.     GE           Greater than or equal to
  1638.     ───────────────────────────────────────────────
  1639.     AND           Bitwise AND
  1640.     ───────────────────────────────────────────────
  1641.     XOR           Bitwise XOR
  1642.     OR           Bitwise OR
  1643.     ───────────────────────────────────────────────
  1644.  
  1645.     The NOT operator in both MASM and TASM is defined to have the
  1646.     same precedence as the AND operator.  However the debugging
  1647.     assumes that all unary operators have a higher precedence than
  1648.     binary operators.
  1649.  
  1650.     All logical Assembler operators return 0FFFFh for a true result
  1651.     and 0 for false.
  1652.  
  1653.     digitsH Hexadecimal
  1654.     digitsD Decimal digits
  1655.     digitsB Binary digits
  1656.     digitsO Octal digits
  1657.     digitsQ Octal
  1658.  
  1659.  
  1660.     11.2 C Language Operators
  1661.  
  1662.     Operator       Description
  1663.     ──────────────────────────────────────────────────────────────
  1664.     -           Unary Minus
  1665.     !           Logical Negation
  1666.     ───────────────────────────────────────────────
  1667.     *           Multiplication
  1668.     /           Division
  1669.     %           Modulus
  1670.     ───────────────────────────────────────────────
  1671.     +           Addition
  1672.     -           Subtraction
  1673.     ───────────────────────────────────────────────
  1674.     <<           Left shift
  1675.     >>           Right shift
  1676.     ───────────────────────────────────────────────
  1677.     <           Less than
  1678.     <=           Less than or equal to
  1679.     >           Greater than
  1680.     >=           Greater than or equal to
  1681.     ───────────────────────────────────────────────
  1682.     ==           Equality
  1683.     !=           Inequality
  1684.     ───────────────────────────────────────────────
  1685.     &           Bitwise AND
  1686.     ───────────────────────────────────────────────
  1687.     ^           Bitwise XOR
  1688.     ───────────────────────────────────────────────
  1689.     |           Bitwise OR
  1690.     ───────────────────────────────────────────────
  1691.     &&           Logical AND
  1692.     ───────────────────────────────────────────────
  1693.     ||           Logical OR
  1694.     ───────────────────────────────────────────────
  1695.  
  1696.     No assignment operators are supported by MMD including the C
  1697.     auto assignment operators (++ and --).
  1698.  
  1699.     0Xdigits  Hexadecimal
  1700.     0Ndigits  Decimal
  1701.     0digits   Octal
  1702.  
  1703.  
  1704.     11.3 Pascal Language Operators
  1705.  
  1706.     Operator       Description
  1707.     ──────────────────────────────────────────────────────────────
  1708.     -           Unary Minus
  1709.     +           Unary plus
  1710.     NOT           Bitwise NOT
  1711.     ───────────────────────────────────────────────
  1712.     *           Multiplication
  1713.     /           Division
  1714.     DIV           Division
  1715.     MOD           Modulus
  1716.     AND           Bitwise AND
  1717.     SHL           Left shift
  1718.     SHR           Right shift
  1719.     ───────────────────────────────────────────────
  1720.     +           Addition
  1721.     -           Subtraction
  1722.     OR           Bitwise OR
  1723.     XOR           Bitwise XOR
  1724.     ───────────────────────────────────────────────
  1725.     <           Less than
  1726.     <=           Less than or equal to
  1727.     >           Greater than
  1728.     >=           Greater than or equal to
  1729.     =           Equality
  1730.     <>           Inequality
  1731.     ───────────────────────────────────────────────
  1732.  
  1733.     MMD supports only the INTEGER forms for each operator, therefore
  1734.     there are no equivalents for the BOOLEAN logical and and or
  1735.     operators.
  1736.  
  1737.     Although the type of the / division operators result is defined
  1738.     as REAL in Pascal, MegaDebugger does not support this data type
  1739.     and so the result will be integer.
  1740.  
  1741.     $digits   Hexadecimal
  1742.     #digits   Decimal
  1743.  
  1744.  
  1745.     11.4 A86 Language Operators
  1746.  
  1747.     Operator       Description
  1748.     ──────────────────────────────────────────────────────────────
  1749.     -           Unary Minus
  1750.     +           Unary Plus
  1751.     NOT           Bitwise NOT
  1752.     !           Logical NOT
  1753.     BIT           Bit Number
  1754.     ───────────────────────────────────────────────
  1755.     *           Multiplication
  1756.     /           Division
  1757.     MOD           Modulus
  1758.     SHL           Left shift
  1759.     SHR           Right shift
  1760.     ───────────────────────────────────────────────
  1761.     +           Addition
  1762.     -           Subtraction
  1763.     ───────────────────────────────────────────────
  1764.     EQ           Equality
  1765.     NE           Inequality
  1766.     LT           Less than
  1767.     LE           Less than or equal to
  1768.     GT           Greater than
  1769.     GE           Greater than or equal to
  1770.     ───────────────────────────────────────────────
  1771.     AND           Bitwise AND
  1772.     ───────────────────────────────────────────────
  1773.     XOR           Bitwise XOR
  1774.     OR           Bitwise OR
  1775.     ───────────────────────────────────────────────
  1776.  
  1777.     The NOT operator in A86 is defined to have the same precedence
  1778.     as the AND operator.  However MMD assumes that all unary
  1779.     operators have a higher precedence than binary operators.
  1780.  
  1781.     All logical Assembler operators return 0FFFFh for a true result
  1782.     and 0 for false.
  1783.  
  1784.     0digits   Hexadecimal
  1785.     digitsH   Hexadecimal
  1786.     digitsD   Decimal
  1787.     digitsB   Binary
  1788.     digitsO   Octal
  1789.     digitsQ   Octal
  1790.     digitsXH  Hexadecimal
  1791.     digitsXD  Decimal
  1792.     digitsXB  Binary
  1793.     digitsXO  Octal
  1794.     digitsXQ  Octal
  1795.  
  1796.     The underscore '_' character can be used to separate digits.
  1797.  
  1798.  
  1799.     12 Error Messages
  1800.     ─────────────────────────────────────────────────────────────────────
  1801.  
  1802.     12.1 Initialisation Errors
  1803.  
  1804.     All error messages MMD displays on the output screen are
  1805.     prefixed with the '<MMD>' string to distinguish them from any
  1806.     possible target output.
  1807.  
  1808.       ■ Cannot find target file : "xxx"
  1809.  
  1810.     This means that MMD cannot find the target file you specified on
  1811.     the command line.  Check that path and file name and try again.
  1812.  
  1813.       ■ Conflicting command line switches.
  1814.  
  1815.     When processing the command line options you supplied
  1816.     MegaDebugger found two switches that conflicted.  For example
  1817.     specifying Screen mode and DOS mode together (/S /D) or two
  1818.     language specifiers.
  1819.  
  1820.       ■ Failure loading target file in DOS LOADEXEC.
  1821.  
  1822.     DOS could not run the target program.  The most common cause of
  1823.     this is that the program is too large to fit into the remaining
  1824.     free memory.  Other causes are that the file is not a valid EXE
  1825.     or COM file, the memory allocation chain is corrupted or MMD has
  1826.     insufficient access rights to execute the file.
  1827.  
  1828.       ■ Internal memory allocation failure.
  1829.  
  1830.     This error message should never appear, as MMD makes only one
  1831.     call to the DOS memory block.  If this message does appear it is
  1832.     likely that your system memory has been corrupted (not unusual
  1833.     when debugging an errant program), reboot and try again.
  1834.  
  1835.       ■ Invalid PIC base interrupt : "xx"
  1836.  
  1837.     The valid range for the new PIC base interrupts are from D8-F0h.
  1838.  
  1839.       ■ Missing or invalid configuration file : "xxx"
  1840.  
  1841.     The configuration file specified with the /C command line option
  1842.     could not be found or was not a valid MMD configuration file.
  1843.  
  1844.       ■ PIC has already been reprogrammed by another VCPI client.
  1845.  
  1846.     When EMM386 or a similar memory manager is running MMD is
  1847.     required to notify the protected mode manager when it reprograms
  1848.     the PIC controller to the new interrupt base.  However if
  1849.     another program has already changed the settings then MMD is not
  1850.     allowed to make any further changes.
  1851.  
  1852.       ■ Target is not an executable file : "xxx"
  1853.  
  1854.     The target file specified in the command line is not a file.
  1855.  
  1856.       ■ Unknown language type specified.
  1857.  
  1858.     Only four languages are supported by MMD /LA; Assembler, /LC; C,
  1859.     /LP; Pascal and /L8; A86.
  1860.  
  1861.       ■ Unknown screen height specified : "xx"
  1862.  
  1863.     MMD supports only 25 and 43 line modes on EGA cards and 25,28,43
  1864.     and 50 with VGA.  MDA and CGA support only 25 line modes.
  1865.  
  1866.       ■ Unknown switch : "xx"
  1867.  
  1868.     Use MMD /? for a list of valid command line switches.
  1869.  
  1870.       ■ VCPI did not allow PIC to be reprogrammed.
  1871.  
  1872.     For some reason the call to notify the VCPI protected mode
  1873.     manager of the changes to the hardware interrupts failed.
  1874.  
  1875.  
  1876.     12.2 Command Errors
  1877.  
  1878.       ■ Bad Expression
  1879.  
  1880.     The expression that you have entered cannot be evaluated by MMD.
  1881.     This is usually caused when an operator is misplaced or a
  1882.     register name is misspelt in the expression.
  1883.  
  1884.       ■ Bad Flag
  1885.  
  1886.     There are two possible causes for this error:
  1887.  
  1888.     - The flag string you supplied to the Register command contained
  1889.       a value that was not the name of a flag.
  1890.  
  1891.     - The string contained conflicting values for the same flag.
  1892.  
  1893.       ■ Bad Format Character
  1894.  
  1895.     The character supplied after an expression or in the Dump
  1896.     command is not one of the format characters MegaDebugger
  1897.     recognises.
  1898.  
  1899.       ■ Bad Register
  1900.  
  1901.     The register name given as a parameter to the Register command
  1902.     was not a valid 16-bit register name.
  1903.  
  1904.       ■ Breakpoint Error
  1905.  
  1906.     This error occurs when using the Set Breakpoint command, and you
  1907.     try to set a new breakpoint at the same address as another
  1908.     breakpoint
  1909.  
  1910.       ■ Closing Quote Character is Missing
  1911.  
  1912.     When evaluating either a quoted character constant in an
  1913.     expression, or in a set of values MMD reached the end of input
  1914.     string before it found a closing quote character.
  1915.  
  1916.       ■ Divide by Zero
  1917.  
  1918.     The value derived for the right hand side of a division or
  1919.     modulus operator was equal to zero.  The result of a division by
  1920.     zero is mathematically undefined.
  1921.  
  1922.       ■ Extra Characters on Line
  1923.  
  1924.     MMD has fulfilled the parameters for a particular command but
  1925.     there are still excess characters remaining on the line.
  1926.  
  1927.       ■ File Error
  1928.  
  1929.     This error occurs when MMD cannot open, write to, or close the
  1930.     file given for the W;Write File or WL;Write Listing commands.
  1931.  
  1932.       ■ MCBs Corrupted
  1933.  
  1934.     This occurs when the Memory Information command detects an error
  1935.     in the structure of the DOS memory allocation system.  This is a
  1936.     serious error and it is unlikely that you will be able to exit
  1937.     without the system crashing.
  1938.  
  1939.       ■ No Free Watches
  1940.  
  1941.     MegaDebugger limits the number of watches you can define to 10,
  1942.     this error is caused if you attempt to add another watch after
  1943.     this limit has been reached.
  1944.  
  1945.       ■ Syntax Error
  1946.  
  1947.     A syntax error occurs when MMD cannot convert the parameters of
  1948.     a command into the required format.  There are four conditions
  1949.     that will cause this error:
  1950.  
  1951.     - The start address in a range is larger than the final address.
  1952.  
  1953.     - One of the items in the list cannot be converted, lists can
  1954.       contain only values between 0 and 9.
  1955.  
  1956.     - One of the items in a set of values cannot be converted, or
  1957.       the value exceeds one maximum number that can be stored in one
  1958.       byte; 255.
  1959.  
  1960.     - An incorrect number of parameters was supplied, usually when a
  1961.       complete range is not given.
  1962.  
  1963.       ■ Unbalanced Parenthesis
  1964.  
  1965.     While evaluating an expression the end of the string was reached
  1966.     and there were unclosed parenthesis.  There must be a matching
  1967.     closing parenthesis ')' for each opening parenthesis '(' and
  1968.     vice versa.
  1969.  
  1970.       ■ Unknown Command
  1971.  
  1972.     The first non space character on the command line did not match
  1973.     any of MMD's command names.
  1974.  
  1975.  
  1976.     13 Known Bugs
  1977.     ─────────────────────────────────────────────────────────────────────
  1978.  
  1979.     /KP does have occasional problems with memory manages such as
  1980.     EMM386 and QEMM.
  1981.  
  1982.     Dual monitor support has not been used with two actual monitors,
  1983.     but has been thoroughly tested as far as possible on a single
  1984.     monitor.
  1985.  
  1986.     MMD does not install its own critical error handler so when
  1987.     writing files from MMD the target's handler will be invoked if a
  1988.     DOS error occurs.
  1989.  
  1990.     Swapping does not support Hercules graphics mode and cannot
  1991.     properly handle text modes which use custom (non-BIOS) fonts.
  1992.  
  1993.     Not all 286 instructions are support by the A; Assemble command,
  1994.     namely the extended shift instructions, 3 operand MUL and all
  1995.     protected mode instructions.  Maths coprocessor instructions are
  1996.     also not supported.
  1997.  
  1998.     MegaDebugger does not restore the entire hardware state.  If the
  1999.     target program is using any critical system interrupts when the
  2000.     Reload Target Program or Quit commands are used then these
  2001.     interrupts will be left containing addresses that point to
  2002.     unused memory locations that will be overwritten when next file
  2003.     is loaded.  In order to avoid crashing the computer when using
  2004.     this command always ensure that either:
  2005.  
  2006.     - The target program has terminated or has not begun execution.
  2007.       When the target program exits it should always return the
  2008.       system to a safe state.
  2009.  
  2010.     - If the target program is still executing then ensure that it
  2011.       is not using any of the critical interrupts.    This can be done
  2012.       using the Memory Information command, if any block that is
  2013.       owned by the target program is using any of the interrupts
  2014.       between 00f and 2Fh then it is unsafe to use the Reload Target
  2015.       Program or Quit commands.
  2016.  
  2017.  
  2018.        When comparing MMD to commercial debuggers (TurboDebugger 3.00
  2019.        and CodeView 2.00) it was interesting to see how poorly they
  2020.        handle fundamental debugging operations:
  2021.  
  2022.     - MMD can handle breakpoints at normalised addresses (same
  2023.       physical address, but different segment:offset address). Both
  2024.       CodeView and TurboDebugger will crash if a breakpoint is
  2025.       executed when set a normalised address, MMD does all its
  2026.       internal address comparisons with 32 bit physical address
  2027.       values.
  2028.  
  2029.     - MMD handles graphics modes much better then TD and CV,
  2030.       especially ModeX.  TurboDebugger has a stupid 'smart' screen
  2031.       swapping which will swap unnecessarily.  CodeView does not
  2032.       have smart swapping.
  2033.  
  2034.     - MMD handles the interaction between WatchPoints and all forms
  2035.       of breakpoint consistently.  For example: CodeView will not
  2036.       update breakpoints with pass counts when watchpoints are set;
  2037.       TurboDebugger will not acknowledge a true watchpoint if a
  2038.       breakpoint exists on the line which makes the watchpoint true.
  2039.  
  2040.  
  2041.     14 Registering
  2042.     ─────────────────────────────────────────────────────────────────────
  2043.  
  2044.     I really want MMD to be the most useful debugger tool available
  2045.     and so would very much like to hear all comments, suggestions,
  2046.     criticisms you have.
  2047.  
  2048.     You can contact me at the following addresses:
  2049.  
  2050.     Internet:
  2051.  
  2052.     n1360906@student.fit.qut.edu.au [until December 1994]
  2053.  
  2054.     No Net Address:
  2055.  
  2056.     Mark Thomas
  2057.     8 Herronbee Street
  2058.     Toowoomba, Queensland
  2059.     Australia  4350.
  2060.  
  2061.  
  2062.     Other software by the same author:
  2063.  
  2064.       2OBJ110
  2065.  
  2066.     2Obj v1.10: Converts binary files directly to OBJ files.  Can
  2067.     decode GIF, PCX, LBM and CEL files and their palettes.    Freeware.
  2068.  
  2069.       DIV0
  2070.  
  2071.     Divide by Zero: the first demo by Sivris.
  2072.  
  2073.       DNC100
  2074.  
  2075.     DOOM Network Copier: Copies DOOM files from a single computer to
  2076.     up to four other machines simultaneously.
  2077.  
  2078.       MCD100
  2079.  
  2080.     MegaChangeDirectory: Replacement for Norton's CD.  Can create
  2081.     NCD compatible TreeInfo files.    Configurable.  Extended directory
  2082.     matching.  To Be Released Soon.
  2083.  
  2084.  
  2085.     15 Future Enhancements
  2086.     ─────────────────────────────────────────────────────────────────────
  2087.  
  2088.     While this version of MMD is complete there is still a great
  2089.     deal I wish to add, which will require almost a complete rewrite
  2090.     of all the current code.  This list is in approximate order of
  2091.     priority:
  2092.  
  2093.     - 386 support.    The first priority is simply adding 386
  2094.       instruction and register support.  Of course adding 386
  2095.       debugging register and v86 mode support is very important.
  2096.       (I have only recently upgraded from a 286)
  2097.  
  2098.     - Commands: I have a long list of commands to be included in the
  2099.       next version.  The main areas are searching (forward and
  2100.       backward global searches, case-insensitive string searches,
  2101.       instruction searches) and debugging commands (Breakpoint on
  2102.       entry or exit into interrupts, Go to RET, Trace into
  2103.       Interrupt).
  2104.  
  2105.     - Improved memory management.  Most important is allowing MMD to
  2106.       use high memory to free more memory under 640k but also to use
  2107.       XMS and EMS.
  2108.  
  2109.     - Remote debugging.  I have already written the communications
  2110.       drivers for serial, parallel, NETBIOS and IPX links but all
  2111.       the MMD commands will have to be re-written to work with the
  2112.       remote link interface.
  2113.  
  2114.     - Better interface: pull down menus, mouse support, resizing etc
  2115.       (and stack and memory and output screen windows).  I
  2116.       personally prefer to have a command line interface for
  2117.       debugging so it will still be available.
  2118.  
  2119.     - Symbolic Debugging.  The original idea of MMD was to provide a
  2120.       alternative to the large symbolic debuggers but now it seems a
  2121.       waste not to include it.  MMD will still be primarily a
  2122.       low-level debugger.
  2123.  
  2124.  
  2125.     I am looking for information on the following:
  2126.  
  2127.     - The EXE debug information format used by CodeView and
  2128.       TurboDebugger (and Watcom, Symantec etc) and details of any
  2129.       debugging hooks placed in executables.
  2130.  
  2131.     - Detecting and using 8 bit interrupt driven parallel I/O.
  2132.  
  2133.     - Interfacing with the NMI, particularly about building a cheap
  2134.           and safe NMI breakout switch that plugs into the bus.
  2135.  
  2136.     - System Management Mode.  One of the most interesting ideas I
  2137.       have seen is to use the SMM of 386SL and 486SL for a debugger.
  2138.       SL chips are used mainly in laptops but apparently all new
  2139.       i486 CPUs have this mode.
  2140.  
  2141. [END]
  2142.